package cn.qqtheme.framework.picker;

import android.app.Activity;
import cn.qqtheme.framework.picker.OptionPicker;
import cn.qqtheme.framework.picker.SinglePicker;

/* loaded from: classes.dex */
public class NumberPicker extends SinglePicker<Number> {

    /* loaded from: classes.dex */
    public interface OnWheelListener extends SinglePicker.OnWheelListener<Number> {
    }

    public NumberPicker(Activity activity) {
        super(activity, new Number[0]);
    }

    public void setRange(int i, int i2) {
        setRange(i, i2, 1);
    }

    public void setRange(int i, int i2, int i3) {
        while (i <= i2) {
            addItem(Integer.valueOf(i));
            i += i3;
        }
    }

    public void setRange(double d, double d2, double d3) {
        while (d <= d2) {
            addItem(Double.valueOf(d));
            d += d3;
        }
    }

    public void setSelectedItem(int i) {
        super.setSelectedItem((NumberPicker) Integer.valueOf(i));
    }

    public void setSelectedItem(double d) {
        super.setSelectedItem((NumberPicker) Double.valueOf(d));
    }

    public void setOnNumberPickListener(OnNumberPickListener onNumberPickListener) {
        super.setOnItemPickListener(onNumberPickListener);
    }

    @Deprecated
    public void setOnOptionPickListener(final OptionPicker.OnOptionPickListener onOptionPickListener) {
        setOnNumberPickListener(new OnNumberPickListener() { // from class: cn.qqtheme.framework.picker.NumberPicker.1
            @Override // cn.qqtheme.framework.picker.NumberPicker.OnNumberPickListener
            public void onNumberPicked(int i, Number number) {
                onOptionPickListener.onOptionPicked(i, number.toString());
            }
        });
    }

    public void setOnWheelListener(OnWheelListener onWheelListener) {
        super.setOnWheelListener((SinglePicker.OnWheelListener) onWheelListener);
    }

    /* loaded from: classes.dex */
    public static abstract class OnNumberPickListener implements SinglePicker.OnItemPickListener<Number> {
        public abstract void onNumberPicked(int i, Number number);

        @Override // cn.qqtheme.framework.picker.SinglePicker.OnItemPickListener
        public final void onItemPicked(int i, Number number) {
            onNumberPicked(i, number);
        }
    }
}
